package com.app.medicalcontrol.bean;

import android.content.Context;
import android.content.Intent;
import android.webkit.JavascriptInterface;

import com.app.medicalcontrol.back.CameraCallBack;
import com.app.medicalcontrol.fragment.WebViewX5Fragment;
import com.uuzuche.lib_zxing.activity.CaptureActivity;

public class JavaScriptinterface extends Object{

    private Context mContext;
    private CameraCallBack mCallBack;
    public JavaScriptinterface( ) {

    }

    public JavaScriptinterface(Context c,CameraCallBack callBack) {
        mContext= c;
        mCallBack = callBack;
    }

    /**
     * 与js交互时用到的方法，在js里直接调用的
     */
    @JavascriptInterface
    public void showCamera(int index) {
        mCallBack.showCamera(index);
//        Toast.makeText(mContext, "测试是否能够调用安卓相册", Toast.LENGTH_LONG).show();
    }

}
